import React, {  useEffect, VFC } from 'react';
import axios from 'axios';
import style from './index.module.less';
import { Form, Input, Button, Checkbox } from 'antd';
import { UserOutlined, LockOutlined } from '@ant-design/icons';


export const LoginPage = () => {
    useEffect(()=>{
        console.dir(axios)
        axios.get(__API__+'/test');
        
        // axios.get(__API__+'').then(res => {
        //     console.log(res);
        // });
    },[]);
    return (
        <div className={style.container}>
            <div className={style.content}>
                <div className={style.avatar}>

                </div>
                <div className={style.form}>
                    <Form name="normal_login" initialValues={{ remember: true }}>
                        <Form.Item name="username" rules={[{ required: true, message: 'Please input your Username!' }]}>
                            <Input prefix={<UserOutlined className="site-form-item-icon" />} placeholder="用户名" />
                        </Form.Item>
                        <Form.Item name="password" rules={[{ required: true, message: 'Please input your Password!' }]}>
                            <Input prefix={<LockOutlined className="site-form-item-icon" />} type="password"placeholder="密码"/>
                        </Form.Item>
                    </Form>
                    <Button style={{width: '100%'}} type="primary" className="login-form-button">
                        登录
                    </Button>
                </div>
            </div>
        </div>
    );
}
export default LoginPage;